package com.jt.service;

import com.jt.pojo.Item;
import com.jt.vo.EasyUiTable;
import org.omg.CORBA.Request;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jt.mapper.ItemMapper;

import java.util.List;

@Service
public class ItemServiceImpl implements ItemService {

	@Autowired
	private ItemMapper itemMapper;


	@Override
	public EasyUiTable findItemByPage(int page, int rows) {
		long total = itemMapper.selectCount(null);
		int start =(page-1)*rows;
		List<Item>itemList = itemMapper.findItemByPage(start,rows);
		return new EasyUiTable(total,itemList);
	}
}
